public class Demo{
    public void main(String[] args){
        System.out.println(sum(10));
    }

    public static int sum(int n){
        if(n==0){
            return 1;
        }else{
            return n+sum(n-1);
        }
    }
}